#import "Person.h"

@implementation Person
// 官方教程是不需要的，但是我的环境下需要这样写才行。
@synthesize firstName = _firstName;
@synthesize lastName = _lastName;

- (NSString*) fullName {
  return [NSString stringWithFormat: @"%@ %@", self.firstName, self.lastName];
}
- (id) init {
  if(self = [super init]) {
    [self initWithFirstName: @"一龙" LastName: @"董"];
  }
  return self;
}
- (id) initWithFirstName: (NSString*) firstName_ LastName: (NSString*) lastName_ {
  if(self = [super init]) {
    _firstName = firstName_;
    _lastName = lastName_;
  }
  return self;
}
@end